<template>
  <el-dialog title="选择用户" top="1vh"  style="top: -40px" :visible.sync="showUserDialog" @close="closeUserModal" width="50%" append-to-body>
    <userList @selectUser="selectUser"></userList>
  </el-dialog>
</template>

<script>
import userList from '@/views/components/user/userList.vue'
export default {
  props: {
    showUserDialog: {
      type: Boolean
    },
    form: {
      type: Object
    },
    ryType: {
      type: String
    }
  },
  components: {
    userList
  },
  data() {
    return {
      formInfo: {
        xcsj: ''
      },
      selectedUsers: [], // 已选择的用户
    };
  },
  methods: {
    closeUserModal() {
      // 关闭选择用户的对话框
      this.$emit("close")
    },
    selectUser(user) {
      this.$emit("selectUser", user, this.ryType)
    },
  },
};
</script>
